// [[ OnflowGenerator Entity UUID: 27e1d98ba75541a79c92c8c01e5d6451 ]]
package com.itdct.onflow.system.file.entity

import com.baomidou.mybatisplus.annotation.TableName
import com.itdct.onflow.core.annotation.Column
import com.itdct.onflow.core.annotation.ColumnRelateDict
import com.itdct.onflow.core.annotation.ColumnRelateId
import com.itdct.onflow.core.annotation.TableDescription
import com.itdct.onflow.core.entity.IdEntity
import java.util.*

/**
 * @author Zhouwx
 * @date 2025/9/28 15:16:01
 * @version 1.0
 * @description
 */
@TableDescription("系统传输中心文件关联")
@TableName("sys_transfer_center_file_rel")
class SysTransferCenterFileRelEntity : IdEntity() {
    @ColumnRelateId(targetClass = SysTransferCenterEntity::class, targetFieldName = "name")
    @Column(comment = "传输中心id关联", nullable = false, defaultValue = "0", indexed = true, sort = 10)
    var transferCenterId = 0L

    @ColumnRelateId(targetClass = SysFileEntity::class, targetFieldName = "fileName")
    @Column(comment = "文件id关联", nullable = false, defaultValue = "0", indexed = true, sort = 20)
    var fileId = 0L

    /**
     * 单个文件的执行状态
     */
    @ColumnRelateDict(dictCode = "sysTransferCenterExecuteState")
    @Column(comment = "执行状态", nullable = false, defaultValue = "0", sort = 30)
    var executeState = 0

    /**
     * 单个文件中的数据总行数
     */
    @Column(comment = "总行数", nullable = false, defaultValue = "0", sort = 40)
    var totalCount = 0

    /**
     * 单个文件中的数据成功行数
     */
    @Column(comment = "成功数量", nullable = false, defaultValue = "0", sort = 50)
    var successCount = 0

    /**
     * 单个文件中的数据失败行数
     */
    @Column(comment = "失败数量", nullable = false, defaultValue = "0", sort = 60)
    var failCount = 0

    /**
     * 单个文件中的数据跳过行数
     */
    @Column(comment = "跳过数量", nullable = false, defaultValue = "0", sort = 60)
    var skipCount = 0

    /**
     * 单个文件中的错误信息
     */
    @Column(comment = "错误信息", nullable = true, length = 2000, sort = 70)
    var errorMessage: String? = null

    @Column(comment = "处理开始时间", sort = 80)
    var startTime: Date? = null

    @Column(comment = "处理结束时间", sort = 90)
    var finishTime: Date? = null

}